<?php
namespace Admin\Model;
use Frame\Libs\BaseModel;

final class UserLogModel extends BaseModel{
	protected $table = "user_log";
	public function UserLog($where,$startpage,$pagesize){
		$sql = "select user_log.*,user.username from {$this->table}";
		$sql .= " inner join user on user.id = user_log.user_id";
		$sql .= " where {$where}";
		$sql .= " order by id desc";
		$sql .= " limit {$startpage},{$pagesize}";
		$result = $this->pdo->fetchAll($sql);
		return $result;
	}
}